package com.yeban.javase.day05;

import java.util.Scanner;

public enum EnumTest {

    WORD(0), PPT(1), EXCEL(2), XMIND(3);

    private final int num;

    EnumTest(int num) {
        this.num = num;
    }
    public int getNum() {
        return num;
    }

    public static void main(String[] args) {

        System.out.println("请输入开档选择(0-3)：");
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (EnumTest enumTest : EnumTest.values()) {
            if (enumTest.getNum() == n) {
                System.out.println("你的开档选择是：" + enumTest.name());
            }
        }
    }
}


